package com.guigu.erp.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.guigu.erp.pojo.DesignProcedure;
import com.guigu.erp.service.DesignProcedureService;
import com.guigu.erp.utils.PageUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * ClassName:DesignProcedureController
 * Package:com.guigu.erp.controller
 * Description:
 *
 * @Date:2024/3/11 21:41
 * @Author:chenchong
 */

/**
 * 工序表
 */
@Controller
@RequestMapping("/Procedure")
public class DesignProcedureController {
    @Autowired
    private DesignProcedureService designProcedureService;

    @RequestMapping("/show")
    @ResponseBody
    public PageUtils<DesignProcedure> show() {
        PageUtils<DesignProcedure> show = designProcedureService.show();
        return show;
    }
    /**
     * 工序明细查询
     * @return
     */
    @ResponseBody
    @RequestMapping("/getOne")
    public DesignProcedure  getOne(String pa) {
        QueryWrapper<DesignProcedure> qw=new QueryWrapper<DesignProcedure>();
        qw.eq("PROCEDURE_ID",pa);
        DesignProcedure one = designProcedureService.getOne(qw);
        return one;
    }
}
